<template>
	<view class="center">
		<!-- <view class="" style="position: relative;">
			<image style="width: 100%;height: 280rpx;" src="/static/image/paybg.png" mode=""></image>
			<view class="" style="position: absolute;top: 50%;left: 2%;transform: translateY(-50%);">
				<view class="" style="display: flex;align-items: center;">
					<image style="width: 100rpx;height: 100rpx;" src="/static/image/avatar.png" mode=""></image>
					<view class="" style="margin-left: 30rpx;">
						<view class="" style="font-size: 32rpx;color: white;">达大厦商户</view>
						<view class="" style="color: white;font-size: 25rpx;background-color: #66666680;padding: 2rpx 5rpx;border-radius: 20rpx;margin-top: 10rpx;">155******592</view>
					</view>
				</view>
			</view>
		</view>
		<view style="margin-top: -50rpx;z-index: 100;width: 92%;left: 50%;transform: translateX(-50%);position: relative;box-sizing: border-box;">
			<view class="" style="background-color: white;border-radius: 15rpx;padding: 20rpx">
				<view class="" style="display: flex;justify-content: center;">
					<view class="" v-for="item in userPriceList" style="width: 50%;display: flex;flex-wrap: wrap;justify-content: center;flex-direction: column;align-items: center;margin-top: 20rpx;">
						<view class="" style="font-size: 30rpx;color: #7b7b7b;">
							{{item.name}}
						</view>
						<view class="" style="font-size: 40rpx;font-weight: bold;">
							{{item.num}}
						</view>
					</view>
				</view>
			</view>
			<view class="" style="background-color: white;border-radius: 15rpx;padding: 20rpx;margin-top: 30rpx;">
				<view class="" style="font-weight: bold;font-size: 30rpx;">
					我的订单
				</view>
				<view class="" style="display: flex;">
					<view v-for="item in productList" style="display: flex;flex-direction: column;align-items: center;width: 20%;margin-top: 20rpx;">
						<image style="width: 50rpx;height: 50rpx;" src="/static/image/orderBlBl.png" mode=""></image>
						<view class="" style="font-size: 30rpx;color: #999;margin-top: 10rpx;">
							{{item.name}}
						</view>
					</view>
				</view>
			</view>
			<view class="" style="background-color: white;border-radius: 15rpx;padding: 20rpx;margin-top: 30rpx;">
				<view class="" style="font-weight: bold;font-size: 30rpx;">
					服务中心
				</view>
				<view class="" style="display: flex;">
					<view v-for="item in serviceList" style="display: flex;flex-direction: column;align-items: center;width: 25%;margin-top: 20rpx;">
						<image style="width: 50rpx;height: 50rpx;" src="/static/image/orderBlBl.png" mode=""></image>
						<view class="" style="font-size: 30rpx;color: #999;margin-top: 10rpx;">
							{{item.name}}
						</view>
					</view>
				</view>
			</view>
		</view> -->
		<web-view :src="url"></web-view>
	</view>
</template>

<script setup>
	import {
		reactive,
		ref,
		toRefs,
		onMounted,
		onUnmounted,
		nextTick
	} from "vue";
	import {
		onLoad,
		onReachBottom,
		onShow,
		onLaunch,
		onReady,
		onTabItemTap
	} from '@dcloudio/uni-app'
	// let url = ref('http://192.168.31.87:5175')
	let url = ref('https://my.mdlvip.cn')
	onLoad(()=>{
		let token = uni.getStorageSync('token')
		// url.value = `http://192.168.31.87:5175/?token=${token}`
		url.value = `https://my.mdlvip.cn/?token=${token}`
	})
	onTabItemTap((e)=>{
		console.log(e);
		let token = uni.getStorageSync('token')
		if(e.index==2 && e.text=='我的'){
			url.value = ''
			nextTick(()=>{
				// url.value = `http://192.168.31.87:5175/?token=${token}`
				url.value = `https://my.mdlvip.cn/?token=${token}`
			})
		}
	})
	// let userPriceList = ref([
	// 	{
	// 		id:1,
	// 		name:'总收入',
	// 		num:1000
	// 	},
	// 	{
	// 		id:2,
	// 		name:'账户余额',
	// 		num:1000
	// 	},
	// 	{
	// 		id:3,
	// 		name:'总单量',
	// 		num:1000
	// 	},
	// 	{
	// 		id:4,
	// 		name:'今日单量',
	// 		num:1000
	// 	},
	// ])
	// let productList = ref([
	// 	{
	// 		id:1,
	// 		name:'待上报'
	// 	},
	// 	{
	// 		id:2,
	// 		name:'待结算'
	// 	},
	// 	{
	// 		id:3,
	// 		name:'已完成'
	// 	},
	// 	{
	// 		id:4,
	// 		name:'已关闭'
	// 	},
	// 	{
	// 		id:5,
	// 		name:'纠纷中'
	// 	},
	// ])
	// let serviceList = ref([
	// 	{
	// 		id:1,
	// 		name:'资金明细'
	// 	},
	// 	{
	// 		id:2,
	// 		name:'微信绑定'
	// 	},
	// 	{
	// 		id:3,
	// 		name:'联系客服'
	// 	},
	// 	{
	// 		id:4,
	// 		name:'商务合作'
	// 	},
	// ])
</script>

<style lang="scss" scoped>
	page {
		background-color: #f9f9f9 !important;
	}
 .center {
	 
 }
</style>
